-- 节行技能的辅助弃牌技能
local jiexing_discard = fk.CreateSkill{
  name = "jiexing_discard",
}

-- 为弃牌技能添加ActiveSkill效果
jiexing_discard:addEffect("active", {
  mute = true,
  min_card_num = 1,
  max_card_num = 4,
  target_num = 0,
  card_filter = function(self, player, to_select, selected)
    local card = Fk:getCardById(to_select)
    -- 检查是否已经选择了该花色的牌
    for _, id in ipairs(selected) do
      local selected_card = Fk:getCardById(id)
      if selected_card.suit == card.suit then
        return false
      end
    end
    return not player:prohibitDiscard(card) and card.suit ~= Card.NoSuit
  end,
})

Fk:loadTranslationTable{
  ["jiexing_discard"] = "节行弃牌",
  [":jiexing_discard"] = "弃置花色各不相同的牌",
}

return jiexing_discard